#pragma once
#include "cgzCTcpC.h"

class cgzCTcpGateC : public cgzCTcpC
{
public:
    cgzCTcpGateC(
        cgzCThreadPool *pool, 
        const char *name, 
        const std::string ip, 
        const int port, 
        const int cid);
    virtual ~cgzCTcpGateC();

public:
    virtual bool sticking();
    virtual bool todoret(cgzGateHeader &header);
    bool run(cgzCLoopC* task) override;
private:
    //{[msgid] = targetid}
    std::unordered_map<int, int> m_gates;
};